<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>H5测试网页</title>
<script type="text/javascript"
	src="/js/jquery-1.9.1.js"></script>
<script type="text/javascript"
	src="/js/bootstrap.js"></script>
<script src="/js/getCurrentDate.js"
	type="text/javascript"></script>
<link
	href="/css/bootstrap.css"
	rel="stylesheet">
<script type="text/javascript">
	$(document).ready(function() {
		var curDate = getCurDate();
		var curDateTime = getCurDateTime();
		var ordernb = "0069" + curDateTime + (Math.random()+"").substring(2,13);
		$("#OrderNo").val(ordernb);
		$("#ReqDate").val(curDate);
	});
	//提交form
	function checkAndSubmit() {
		//提交form
		if ($("#createSign")[0].checked == true) {
			document.hform.action = "../h5/submit.action";
			document.hform.submit();
		} else {
			alert("请选择签名");
		}

	}

	function Sign() {
		if ($("#createSign")[0].checked == true) {
			$.ajax({
				url : 'sign.action',
				type : 'post',
				dataType : "text",
				data : $('#hform').serialize(),
				cache : false,
				async : false,
				success : function(result) {
					$("#SignValue").val(result);
				}
			});
		}
	}
</script>
<body>
	<form class="form-horizontal" name="hform" method="post" id="hform">
		<table class="table table-striped">
			<tr>
				<td>
					<div class="control-group">
						<label class="control-label" for="inputEmail">订单号:</label>
						<div class="controls">
							<input type="text" id="OrderNo" name="OrderNo"/>
						</div>
					</div>

					<!-- <div class="control-group">
						<label class="control-label" for="inputEmail">买家ID:</label>
						<div class="controls">
							<input type="text" id="BuyerID" name="BuyerID" value="WXBuyerID"/>
						</div>
					</div> -->

					<div class="control-group">
						<label class="control-label" for="inputEmail">中国移动用户标识类型:</label>
						<div class="controls">
							<input type="text" id="IDType" name="IDType" value="01" />
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">中国移动用户号码:</label>
						<div class="controls">
							<input type="text" id="IDValue" name="IDValue" value="13510434519" />
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">订单总金额:</label>
						<div class="controls">
							<input type="text" id="OrderMoney" name="OrderMoney" value="1"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">用户支付金额:</label>
						<div class="controls">
							<input type="text" id="Payment" name="Payment" value="1"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">商户赠送金额:</label>
						<div class="controls">
							<input type="text" id="Gift" name="Gift" value="0"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">商户活动编号:</label>
						<div class="controls">
							<input type="text" id="MerActivityID" name="MerActivityID" value=""/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">支付方式:</label>
						<div class="controls">
							<select name="PaymentType">
								<option value="ALIPAY-WEB">ALIPAY-WEB</option>
								<option value="ALIPAY-WAP">ALIPAY-WAP</option>
								<option value="ALIPAY-BANK">ALIPAY-BANK</option>
								<option value="WEIXIN-JSAPI">WEIXIN-JSAPI</option>
								<option value="UNIONPAY-GATEWAY">UNIONPAY-GATEWAY</option>
								<option value="UNIONPAY-WAP">UNIONPAY-WAP</option>
							</select>
						</div>
					</div>
                    <div class="control-group">
						<label class="control-label" for="inputEmail">网银支付银行代码:</label>
						<div class="controls">
							<input type="text" id="DefaultBank" name="DefaultBank" value=""/>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="inputEmail">支付限制:</label>
						<div class="controls">
							<input type="text" id="PaymentLimit" name="PaymentLimit" value=""/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">产品编号:</label>
						<div class="controls">
							<input type="text" id="ProductID" name="ProductID" value="111111"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">产品名称:</label>
						<div class="controls">
							<input type="text" id="ProductName" name="ProductName" value="充值"/>
						</div>
					</div>
				</td>
				<td>

					<div class="control-group">
						<label class="control-label" for="inputEmail">产品描述:</label>
						<div class="controls">
							<input type="text" id="ProductDesc" name="ProductDesc" value="在线支付充值"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">商品展示网址:</label>
						<div class="controls">
							<input type="text" id="ProductURL" name="ProductURL" value="http://192.168.59.200/ProductShow"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">订单结果通知URL:</label>
						<div class="controls">
							<input type="text" id="NotifyURL" name="NotifyURL" value="http://127.0.0.1:8086/payprod-format/merchant/notify.action"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">支付成功返回URL:</label>
						<div class="controls">
							<input type="text" id="ReturnURL" name="ReturnURL" value="http://localhost:8080/payprod-format/merchant/return"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">客户端IP:</label>
						<div class="controls">
							<input type="text" id="ClientIP" name="ClientIP" value="192.168.1.100"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">商户自定义参数:</label>
						<div class="controls">
							<input type="text" id="CustomParam" name="CustomParam" value="key=valuue|key2=value2"/>
						</div>
					</div>

					<!-- <div class="control-group">
						<label class="control-label" for="inputEmail">微信用户标识:</label>
						<div class="controls">
							<input type="text" id="WeiXinOpenId" name="WeiXinOpenId" value="1">
						</div>
					</div> -->

					<div class="control-group">
						<label class="control-label" for="inputEmail">微信公众号ID:</label>
						<div class="controls">
							<input type="text" id="WeiXinAppId" name="WeiXinAppId"  value="wx9033126e8e910866">
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">CerId:</label>
						<div class="controls">
							<input value="798055fe" name="CerID" id="CerID" inputtype="hidden"/>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label" for="inputEmail">签名数值:</label>
						<div class="controls">
							<input type="text" id="SignValue" name="SignValue" value=""/>
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="control-group">
						<div class="controls">
							<label class="checkbox"> <input type="checkbox"
								id="createSign" onClick="Sign()">生成签名
							</label>
						</div>
					</div>
				</td>
				<td>
					<div class="controls">
						<button type="button" class="btn btn-primary"
							onClick="checkAndSubmit()">提交</button>
					</div>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
